#include <iostream>
#include <string>
#include <ctime>
using namespace std;

struct Student{
    string name;
    int score;
};

struct Teacher{
    string name;
    struct Student sArray[5];
};

void initData(struct Teacher teacher[],int len){
    string nameSeed="ABCDE";
    for(int i=0;i<len;i++){
        teacher[i].name="Teacher_";
        teacher[i].name+=nameSeed[i];
        for(int j=0;j<5;j++){
            teacher[i].sArray[j].name="Student_";
            teacher[i].sArray[j].name+=nameSeed[j];
            int score=rand()%61+40;
            teacher[i].sArray[j].score=score;
        }
    }
}

void printData(struct Teacher teacher[],int len){
    for(int i=0;i<len;i++){
        cout<<"老师姓名: "<<teacher[i].name<<endl;
        for(int j=0;j<5;j++){
            cout<<"\t学生姓名： "<<teacher[i].sArray[j].name<<" 学生成绩: "<<teacher[i].sArray[j].score<<endl;
        }
    }
}

int main(){
    srand((unsigned int)time(NULL));
    struct Teacher teacher[3];
    int len=sizeof(teacher)/sizeof(teacher[0]);
    initData(teacher,len);
    printData(teacher,len);
    return 0;
}
